//package beans;
//
//import java.io.Serializable;
//
//import javax.annotation.PostConstruct;
//import javax.faces.application.FacesMessage;
//import javax.faces.bean.ManagedBean;
//import javax.faces.bean.ViewScoped;
//import javax.faces.context.FacesContext;
//
//import org.primefaces.extensions.component.layout.LayoutPane;
//import org.primefaces.extensions.event.CloseEvent;
//import org.primefaces.extensions.event.OpenEvent;
//import org.primefaces.extensions.event.ResizeEvent;
//import org.primefaces.extensions.model.layout.LayoutOptions;
//
//@ManagedBean  
//@ViewScoped  
//public class FullLayoutController implements Serializable {  
//  
//    private static final long serialVersionUID = 20120925L;  
//  
//    private LayoutOptions layoutOptions;  
//  
//    protected void initialize1() {  
////        layoutOptions = new LayoutOptions();  
////  
////        // options for all panes  
////        LayoutOptions panes = new LayoutOptions();  
////        panes.addOption("slidable", false);  
////        panes.addOption("spacing", 6);  
////        panes.addOption("resizeWhileDragging", false);  
////        layoutOptions.setPanesOptions(panes);  
////  
////        // options for center pane  
////        LayoutOptions center = new LayoutOptions();  
////        layoutOptions.setCenterOptions(center);  
////  
////        // options for nested center layout  
////        LayoutOptions childCenterOptions = new LayoutOptions();  
////        center.setChildOptions(childCenterOptions);  
////  
////        // options for center-north pane  
////        LayoutOptions centerNorth = new LayoutOptions();  
////        centerNorth.addOption("size", "50%");  
////        childCenterOptions.setNorthOptions(centerNorth);  
////  
////        // options for center-center pane  
////        LayoutOptions centerCenter = new LayoutOptions();  
////        centerCenter.addOption("minHeight", 60);  
////        childCenterOptions.setCenterOptions(centerCenter);  
////  
////        // options for west pane  
////        LayoutOptions west = new LayoutOptions();  
////        west.addOption("size", 200);  
////        layoutOptions.setWestOptions(west);  
////  
////        // options for nested west layout  
////        LayoutOptions childWestOptions = new LayoutOptions();  
////        west.setChildOptions(childWestOptions);  
////  
////        // options for west-north pane  
////        LayoutOptions westNorth = new LayoutOptions();  
////        westNorth.addOption("size", "33%");  
////        childWestOptions.setNorthOptions(westNorth);  
////  
////        // options for west-center pane  
////        LayoutOptions westCenter = new LayoutOptions();  
////        westCenter.addOption("minHeight", "60");  
////        childWestOptions.setCenterOptions(westCenter);  
////  
////        // options for west-south pane  
////        LayoutOptions westSouth = new LayoutOptions();  
////        westSouth.addOption("size", "33%");  
////        childWestOptions.setSouthOptions(westSouth);  
////  
////        // options for east pane  
////        LayoutOptions east = new LayoutOptions();  
////        east.addOption("size", 200);  
////        layoutOptions.setEastOptions(east);  
////  
////        // options for south pane  
////        LayoutOptions south = new LayoutOptions();  
////        south.addOption("size", 80);  
////        layoutOptions.setSouthOptions(south);  
//    }  
//    
//    @PostConstruct  
//    protected void initialize() {  
//		layoutOptions = new LayoutOptions();
//
//		// options for all panes
//		LayoutOptions panes = new LayoutOptions();
//        panes.addOption("spacing", 6);  
//		layoutOptions.setPanesOptions(panes);
//
//		LayoutOptions center = new LayoutOptions();
//		center.addOption("resizable", false);
//		layoutOptions.setCenterOptions(center);
//
//		// options for nested center layout
//		LayoutOptions childCenterOptions = new LayoutOptions();
//		center.setChildOptions(childCenterOptions);
//
//		// options for center-center pane
//		LayoutOptions centerCenter = new LayoutOptions();
//		centerCenter.addOption("resizable", false);
//		centerCenter.addOption("collapsible", false);
//		centerCenter.addOption("closable", false);
//		childCenterOptions.setCenterOptions(centerCenter);
//		
//		// options for center-east pane
//		LayoutOptions centerEast = new LayoutOptions();
//		centerEast.addOption("size", "50%");
//		centerEast.addOption("resizable", false);
//		centerEast.addOption("collapsible", false);
//		centerEast.addOption("closable", false);
//		childCenterOptions.setEastOptions(centerEast);
//		
//		// options for nested center center layout
//		LayoutOptions childCenterCenterOptions = new LayoutOptions();
//		centerCenter.setChildOptions(childCenterCenterOptions);
//
//		// options for center-center-center pane
//		LayoutOptions centerCenterCenter = new LayoutOptions();
//		childCenterCenterOptions.setCenterOptions(centerCenterCenter);
//
//		// options for center-center-west pane
//		LayoutOptions centerCenterWest = new LayoutOptions();
//		centerCenterWest.addOption("size", "35%");
//		centerCenterWest.addOption("minSize", "300");  
//		childCenterCenterOptions.setWestOptions(centerCenterWest);
//		//done
//		
//		// options for nested center center layout
//		LayoutOptions childCenterEastOptions = new LayoutOptions();
//		centerEast.setChildOptions(childCenterEastOptions);
//
//		// options for center-east-center pane
//		LayoutOptions centerEastCenter = new LayoutOptions();
//		childCenterEastOptions.setCenterOptions(centerEastCenter);
//
//		// options for center-east-east pane
//		LayoutOptions centerEastEast = new LayoutOptions();
//		centerEastEast.addOption("size", "35%");
//		centerCenterWest.addOption("minSize", "300");  
//		childCenterEastOptions.setEastOptions(centerEastEast);
//		
////		NORTH
//		LayoutOptions north = new LayoutOptions();
//		layoutOptions.setNorthOptions(north);
//
//		// options for nested north layout
//		LayoutOptions childNorthOptions = new LayoutOptions();
//		north.addOption("size", "110");
//		north.addOption("resizable", false);
//		north.setChildOptions(childNorthOptions);
//
//		// options for north-center pane
//		LayoutOptions northCenter = new LayoutOptions();
//		northCenter.addOption("resizable", false);
//		northCenter.addOption("collapsible", false);
//		northCenter.addOption("closable", false);
//		childNorthOptions.setCenterOptions(northCenter);
//
//		// options for north-east pane
//		LayoutOptions northEast = new LayoutOptions();
//		northEast.addOption("size", "50%");
//		northEast.addOption("resizable", false);
//		northEast.addOption("collapsible", false);
//		northEast.addOption("closable", false);
//		childNorthOptions.setEastOptions(northEast);
//
////		SOUTH
//		LayoutOptions south = new LayoutOptions();
//		south.addOption("size", "40");
//		south.addOption("resizable", false);
//		south.addOption("collapsible", false);
//		south.addOption("closable", false);
//		layoutOptions.setSouthOptions(south);
//    }
//  
//    public LayoutOptions getLayoutOptions() {  
//        return layoutOptions;  
//    }  
//  
//    public void handleClose(CloseEvent event) {  
//        FacesMessage msg =  
//            new FacesMessage(FacesMessage.SEVERITY_INFO, "Layout Pane closed",  
//                             "Position:" + ((LayoutPane) event.getComponent()).getPosition());  
//  
//        FacesContext.getCurrentInstance().addMessage(null, msg);  
//    }  
//  
//    public void handleOpen(OpenEvent event) {  
//        FacesMessage msg =  
//            new FacesMessage(FacesMessage.SEVERITY_INFO, "Layout Pane opened",  
//                             "Position:" + ((LayoutPane) event.getComponent()).getPosition());  
//  
//        FacesContext.getCurrentInstance().addMessage(null, msg);  
//    }  
//  
//    public void handleResize(ResizeEvent event) {  
//        FacesMessage msg =  
//            new FacesMessage(FacesMessage.SEVERITY_INFO, "Layout Pane resized",  
//                             "Position:" + ((LayoutPane) event.getComponent()).getPosition() + ", new width = "  
//                             + event.getWidth() + "px, new height = " + event.getHeight() + "px");  
//  
//        FacesContext.getCurrentInstance().addMessage(null, msg);  
//    }  
//}  